Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Node / ReticulumProjects / MeshChatX.git / files / scripts / ci / github-build-linux-snap.sh

Displaying Raw • Download


scripts/ci/github-build-linux-snap.sh 54e2728c6fbabef51e240871547590970649fb25 (54e2728c) Text, 1.22 KB

T8b949e#!/usr/bin/env bash
T8b949e# Build a Snap via electron-forge's @electron-forge/maker-snap.
T8b949e#
T8b949e# Expects ``meshchatx/public/`` to already contain a prebuilt frontend bundle
T8b949e# (downloaded from the reusable Frontend build workflow), so this script only
T8b949e# rebuilds the cx_Freeze backend before running ``electron-forge make``.
T8b949e#
T8b949e# Required system packages (installed by the workflow):
T8b949e# - snapcraft (installed via ``snap install snapcraft --classic``)
T8b949e# - LXD or multipass when building outside ``--use-lxd``/``--destructive-mode``
T8b949e# (electron-forge invokes snapcraft itself; we set
T8b949e# ``SNAPCRAFT_BUILD_ENVIRONMENT=host`` so the snap is built directly on the
T8b949e# runner without needing a build VM).
Tffa657set -euo pipefail

Te6edf3ROOTTff7b72=Ta5d6ff"Tff7b72$(Tffa657cd Ta5d6ff"Tff7b72$(dirname Ta5d6ff"Te6edf3$0Ta5d6ff"Tff7b72)Ta5d6ff/../..Ta5d6ff" Tff7b72&& Tffa657pwdTff7b72)Ta5d6ff"
Tffa657cd Ta5d6ff"Te6edf3$ROOTTa5d6ff"

Tff7b72if Tff7b72[Tff7b72[ ! -f Ta5d6ff"meshchatx/public/index.html" Tff7b72]Tff7b72]Tb4b4b4; Tff7b72then
Tffa657echo Ta5d6ff"meshchatx/public/index.html is missing; download the prebuilt frontend artifact first." >Tb4b4b4&T79c0ff2
Tffa657exit T79c0ff1
Tff7b72fi

Tffa657export Te6edf3PLATFORMTff7b72=linux

pnpm run electron-postinstall
pnpm run version:sync
pnpm run build-backend

Te6edf3SNAPCRAFT_BUILD_ENVIRONMENTTff7b72=Ta5d6ff"Tffd700${Te6edf3SNAPCRAFT_BUILD_ENVIRONMENTTff7b72:-Te6edf3hostTffd700}Ta5d6ff" Tffea00\
Te6edf3FORGE_MAKE_SNAPTff7b72=T79c0ff1 Tffea00\
node scripts/electron-forge-local-tmp.js make --targets @electron-forge/maker-snap


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────